<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
    class VNode{
      constructor(tag,data,children,text,elm){
        this.tag= tag;
        this.data=data;
        this.children=children;
        this.text=text;
        this.elm=elm;
      }
    }
    // function createEmptyVNode() {
    //   const node = new VNode();
    //   node.text = '';
    //   return node
    // }
    function render () {
      return new VNode(
          'span',
          {
            /* 指令集合数组 */
            directives: [
              {
                /* v-show指令 */
                rawName: 'v-show',
                expression: 'isShow',
                name: 'show',
                value: true
              }
            ],
            /* 静态class */
            staticClass: 'demo'
          },
          [ new VNode(undefined, undefined, undefined, 'This is a span.') ],
          'text',
      );
    }
    console.log(render());
</script>
</body>
</html>